//自定义模块代码:
layui.define(["jquery", "layer"], function (exports) {
    var $ = layui.jquery;
     var jqxhr;
    // 设置ajax请求完成后调用的函数
    $.ajaxSetup({
        complete: function (jqxhr, status) {
            if("REDIRECT" == jqxhr.getResponseHeader("REDIRECT")){

                top.layer.alert("登录超时，请重新登录！",{
                    skin: 'layui-layer-lan'
                    ,closeBtn: 0
                    ,shift: 2
                },function () {
                    top.location.href = serverPath.systemPath + "/login";
                });
            }

        }
    });
    exports('ajaxSetting', {});
});
